﻿using System.Windows.Controls;
using System.Windows.Input;
using WhiteFlow.Wpf.Common.Commands;
using WhiteFlow.Wpf.Common.Mvvm.ViewModel;

namespace WhiteFlow.DevTrackingTool.UI.ViewModels
{
    public class WorksheetChildViewModelBase : ViewModelBase
    {
        #region Constants

        /// <summary>
        /// The owner ViewModel.
        /// </summary>
        public const string OwnerWorksheetViewModelPropertyName = "OwnerWorksheetViewModel";

        #endregion

        #region Fields

        internal WorksheetViewModel ownerWorksheetViewModel;

        #endregion

        #region Properties

        public WorksheetViewModel OwnerWorksheetViewModel
        {
            get { return ownerWorksheetViewModel; }
            set
            {
                ownerWorksheetViewModel = value;
                OnPropertyChanged(OwnerWorksheetViewModelPropertyName);
            }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="WorksheetChildViewModelBase"/> class.
        /// </summary>
        /// <param name="worksheetViewModel">The worksheet view model.</param>
        public WorksheetChildViewModelBase(WorksheetViewModel worksheetViewModel)
        {
            OwnerWorksheetViewModel = worksheetViewModel;
        }

        #endregion
    }
}